class RandomFunction {
    static getRandomString(len) {
      let _charStr = 'abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789',
          min = 0,
          max = _charStr.length - 1,
          _str = '';                    //定义随机字符串 变量
      len = len || 15;
      for (let i = 0, index; i < len; i++) {
        index = (function (randomIndexFunc, i) {
          return randomIndexFunc(min, max, i, randomIndexFunc);
        })(function (min, max, i, _self) {
          let indexTemp = Math.floor(Math.random() * (max - min + 1) + min),
              numStart = _charStr.length - 10;
          if (i === 0 && indexTemp >= numStart) {
            indexTemp = _self(min, max, i, _self);
          }
          return indexTemp;
        }, i);
        _str += _charStr[index];
      }
      return _str;
    }
}

export default RandomFunction;
